package com.s69.swaggerdemo.service;

import com.s69.swaggerdemo.entity.UserInfo;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class UserInfoService {
    public UserInfo getUser(Integer id) {
        return new UserInfo(1,"葛宇豪","123456");

    }

    public List<UserInfo> getList() {
        List<UserInfo> users= Arrays.asList(
                new UserInfo(1,"zhangsan","12345"),
                new UserInfo(2,"lisi","123456"),
                new UserInfo(3,"wangwu","12345")
        );
        return users;
    }
}
